package org.groupg.practice.guiPractice.awt;

import java.awt.*;

public class SendMailer {
    private final Frame f = new Frame("测试");
    private final TextField tf = new TextField(40);
    private final Button send = new Button("发送");

    public static void main(String[] args) {
        new SendMailer().init();
    }

    public void init() {
        // 使用MailerListener对象作为事件监听器
        send.addActionListener(new MailerListener(tf));
        f.add(tf);
        f.add(send, BorderLayout.SOUTH);
        f.pack();
        f.setVisible(true);
    }
}
